/******************************************************************************
Tinapoc Project - The Java Reverse Engineering Toolkit
Copyright (C) 2005  Daniel Reynaud-Plantey

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
******************************************************************************/

package tina.utils;

public class StringNormalizer {
    private StringNormalizer() {}

// replace newlines with \n, tabs with \t, quotes with \"
// should do the same with backslashes !
    public static String removeSpecialCharacters(String str) {
        String result;
        result = str.replaceAll("\n", "\\\\n");
        result = result.replaceAll("\t", "\\\\t");
        result = result.replaceAll("\"", "\\\\\"");
        return result;
    }
}